package openbang.account.service.entity;


import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.gwt.user.client.rpc.IsSerializable;

import java.util.Date;


/**
 * The persistent class for the contract_addr database table.
 * 
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class ContractAddr implements IsSerializable {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private String addrDetail="";

	@Persistent
	private Integer city=0;

	@Persistent
    private String contractName="";

	@Persistent
	private String contractTel="";

	@Persistent
	private Integer country=0;

	@Persistent
	private Integer defaultType=0;

	@Persistent
	private String postZip="";

	@Persistent
	private Integer province=0;

	@Persistent
	private String remark="";

	private Date updTime = new Date();

	//TODO 无主的一对多关系
	//bi-directional many-to-one association to UserAccount
	//@ManyToOne(fetch=FetchType.LAZY)
	@Persistent
	private UserAccount userAccount;

    public ContractAddr() {
    }

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getAddrDetail() {
		return this.addrDetail;
	}

	public void setAddrDetail(String addrDetail) {
		this.addrDetail = addrDetail;
	}

	public Integer getCity() {
		return this.city;
	}

	public void setCity(Integer city) {
		this.city = city;
	}

	public String getContractName() {
		return this.contractName;
	}

	public void setContractName(String contractName) {
		this.contractName = contractName;
	}

	public String getContractTel() {
		return this.contractTel;
	}

	public void setContractTel(String contractTel) {
		this.contractTel = contractTel;
	}

	public Integer getCountry() {
		return this.country;
	}

	public void setCountry(Integer country) {
		this.country = country;
	}

	public Integer getDefaultType() {
		return this.defaultType;
	}

	public void setDefaultType(Integer defaultType) {
		this.defaultType = defaultType;
	}

	public String getPostZip() {
		return this.postZip;
	}

	public void setPostZip(String postZip) {
		this.postZip = postZip;
	}

	public Integer getProvince() {
		return this.province;
	}

	public void setProvince(Integer province) {
		this.province = province;
	}

	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Date getUpdTime() {
		return this.updTime;
	}

	public void setUpdTime(Date updTime) {
		this.updTime = updTime;
	}

	public UserAccount getUserAccount() {
		return this.userAccount;
	}

	public void setUserAccount(UserAccount userAccount) {
		this.userAccount = userAccount;
	}
	
}